//#############################################################################
//#############################################################################
//This source file was written by Mert Dogar. If you have some questions about 
//the source code, please do not hesitate to ask me.
//The code is under GPL.
//Email: mertdogar@gmail.com , http://code.google.com/p/electron-cds
//#############################################################################
//#############################################################################

#ifndef PROJECT_H
#define PROJECT_H


#include "main.h"
#include "component_base.h"
#include "tvector.h"
#include "sheet.h"

class project
{
	public:
		project();
		~project();
	struct psheet
	{
		sheet mysheet;
		std::string name;
	};

		psheet* active_sheet ;
		cbase &get_component(int index);
		void save_project(std::string filename);
		void tadd_component(Cairo::RefPtr<Cairo::Context> myContext, std::string type, vector2 pos);
		void add_component(std::string type, vector2 pos);
		void print_components()	;	
		void init(Cairo::RefPtr<Cairo::Context> myContext);
		int isonwho(vector2 pos);
	private:


		tvector<psheet > sheets;

		Cairo::RefPtr<Cairo::Context> cr;
};

#endif


